package com.example.exception;

import com.example.enums.BizCodeEnum;
import lombok.Data;

/**
 * @author yinxin
 * @version 1.0
 * @Description:
 * @date 2022/6/29:19
 */
@Data
public class BizException extends RuntimeException{

    private Integer code;

    private String msg;

    public BizException(BizCodeEnum bizCodeEnum) {
        super(bizCodeEnum.getMessage());
        this.code = bizCodeEnum.getCode();
        this.msg = bizCodeEnum.getMessage();
    }
}
